import { Callout } from 'nextra/components';
import { NextSeo } from 'next-seo';

<NextSeo description="How to create AWS access keys for Bref" />

# Creating AWS access keys

To create AWS access key for Bref and the `serverless` CLI tool follow these steps:

1. In the AWS dashboard, go into IAM and create a new user: [**click here** for a direct link](https://us-east-1.console.aws.amazon.com/iamv2/home#/users/create).

1. Set a user name (for example "bref-cli") and move to the next screen.

    ![](./aws-keys-step-1.png)

1. Click **Attach policies directly**, search for **AdministratorAccess** and select it.

    ![](./aws-keys-step-2.png)

    <Callout type="warning">
        The "AdministratorAccess" policy grants **full access** to your AWS account. This is simpler when starting with AWS and Bref. However, it is recommended to restrict permissions further eventually (especially if you create access to other members of your team). Here is an example of an [IAM policy with stricter permissions](./minimal-aws-policy.mdx), use it as a starting point. <br/>
        Alternatively, you can check out [Bref Cloud](/cloud): it lets you deploy without creating AWS access keys, and lets you manage access to team members via simple permissions (read-only, write, admin).
    </Callout>

1. Finish creating the user.

1. Once your user is created, select it and go to **Security credentials**.

   ![](./aws-keys-step-3.png)

1. Scroll down to **Access Keys** and click on **Create access key**.

   ![](./aws-keys-step-4.png)

1. Then select **Command Line Interface**.

   ![](./aws-keys-step-5.png)

1. Add a description to your access keys and click on **Create access key**.

   ![](./aws-keys-step-6.png)

[< Back to the installation guide](../setup.mdx)
